<template>
<view>
	<block v-if="isload">
		<view class="codeimg">
			<image :src="userinfo.member_code_img"></image>
			<view>编号：{{userinfo.member_code}}</view>
		</view>
		
	</block>
	<loading v-if="loading"></loading>
	<dp-tabbar :opt="opt"></dp-tabbar>
	<popmsg ref="popmsg"></popmsg>
</view>
</template>

<script>
var app = getApp();

export default {
  data() {
    return {
			opt:{},
			loading:false,
      isload: false,
			menuindex:-1,
			pre_url:app.globalData.pre_url,
			
      userinfo: [],
			set:{}
    };
  },

  onLoad: function (opt) {
		this.opt = app.getopts(opt);
		var that = this;
		this.getdata();
  },
	onPullDownRefresh: function () {
		this.getdata();
	},
  methods: {
		getdata: function () {
			uni.setNavigationBarTitle({
			  title: '会员码'
			});
			var that = this;
			that.loading = true;
			app.get('ApiMy/getMemberCode', {}, function (res) {
				that.loading = false;
				that.userinfo = res.userinfo;
				that.set = res.set;
				that.txmoney     = res.txmoney;
				that.rechargeyj_withdraw = res.rechargeyj_withdraw;
				that.loaded();
			});
		},
    cancel: function () {
      this.hiddenmodalput = true;
    },
  }
};
</script>
<style>
.codeimg { text-align: center;padding: 60rpx;width: auto;background-color: #fff;margin: 30rpx;border-radius: 10rpx;}
.codeimg image {width: 320rpx;height: 320rpx;margin-bottom: 20rpx;}
</style>